home *** CD-ROM | disk | FTP | other *** search
/ The VPRO Digital Guide 1994 / vpro.iso / vpro1 / jg.dir / 00027_LocalMOVIE Script.ls < prev    next >
Encoding:
Text File  |  1994-08-28  |  7.9 KB  |  300 lines

  1. on LocalStartMovie
  2.   global gHasExternals, gSpecNav, gHasMoney, gComingFromJG, FortySeven
  3.   set gComingFromJG to 0
  4.   set FortySeven to EMPTY
  5.   if voidp(gHasMoney) then
  6.     set gHasMoney to 1
  7.   end if
  8.   set gSpecNav to "1"
  9.   set gHasExternals to 4
  10.   if the frame > 19 then
  11.     JGSetup()
  12.   end if
  13.   if the frame < 14 then
  14.     repeat with i = 2 to 3
  15.       set the visible of sprite i to 1
  16.     end repeat
  17.     repeat with i = 34 to 41
  18.       set the visible of sprite i to 1
  19.     end repeat
  20.   end if
  21.   set the visible of sprite 47 to 0
  22.   puppetTransition(9, 1, 8)
  23. end
  24.  
  25. on SetupInvisibles
  26.   repeat with count = 1 to 21
  27.     set the visible of sprite count to 0
  28.   end repeat
  29. end
  30.  
  31. on delay Factor
  32.   set the timer to 1
  33.   repeat while the timer < Factor
  34.   end repeat
  35. end
  36.  
  37. on SpecialNavigation
  38.   global gHasExternals, Chars1and2, Chars1to3, Char3, Chars4and5, gDirection, gNext, gPrev, gSpecNav
  39.   if (gNext = 1) or (gPrev = 1) then
  40.     alert("Je kan daar hiervandaan niet heen!")
  41.     set Chars4and5 to 0
  42.     set Chars1to3 to "JG1"
  43.   else
  44.     if integer(gDirection) > 0 then
  45.       set theMovie to Chars1and2 & integer(gHasExternals) + integer(gDirection)
  46.       PlayExternalMovie(theMovie)
  47.     else
  48.       set gDirection to 1
  49.     end if
  50.   end if
  51. end
  52.  
  53. on JGSetup
  54.   global gStore, gVertOffset, gVertSprite, gLastState, gHorzlist, gVertlist, gCastlist, gCastframeList, gLastSound, gHasMoney
  55.   SetupInvisibles()
  56.   JGSetup2()
  57.   if gHasMoney = 1 then
  58.     set the visible of sprite 38 to 0
  59.   else
  60.     set the visible of sprite 38 to 1
  61.   end if
  62.   set gLastSound to "stop"
  63.   set gHorzlist to "1991, 2241,1662,1993,1092,628,2357,1,1,2559,1570,2850,2363,2721,2100,1867"
  64.   set gVertlist to "211, 418,426,412,344,428,710,1,1,432,388,370,412,417,10,662"
  65.   set gCastlist to "15, 30,21,18,114,0,8,0,0,69,65,61,51,28,36,54"
  66.   set gCastframeList to "1, 3 ,6 ,3 ,3 ,1 ,4,0,0,4,3,1,2,1,1,5"
  67.   set the visible of sprite 11 to 1
  68.   set gVertSprite to 11
  69.   set gLastState to the mouseDown
  70.   puppetSprite(29, 0)
  71.   puppetSprite(30, 0)
  72.   set the visible of sprite 48 to 1
  73. end
  74.  
  75. on JGSetup2
  76.   repeat with i = 22 to 37
  77.     set the visible of sprite i to 0
  78.     set the cursor of sprite i to 3
  79.     puppetSprite(i, 1)
  80.     set the locH of sprite i to -300
  81.   end repeat
  82. end
  83.  
  84. on hideObjects firstS, lastS
  85.   if the castNum of sprite 30 = 100 then
  86.     pauseMoov()
  87.   end if
  88.   repeat with i = firstS to lastS
  89.     set the visible of sprite i to 0
  90.     set the locH of sprite i to -300
  91.   end repeat
  92. end
  93.  
  94. on ShowObjects firstS, lastS
  95.   global gVertSprite, gHorzlist, gVertlist, gCastlist, gCastframeList, gLastSound
  96.   set Vert to the locV of sprite gVertSprite
  97.   set Horz to the locH of sprite gVertSprite
  98.   if the visible of sprite 29 then
  99.     set the visible of sprite 32 to 0
  100.   end if
  101.   repeat with i = firstS to lastS
  102.     set mijnindex to i - firstS + 1
  103.     set PositionH to value(item mijnindex of gHorzlist) + Horz
  104.     set PositionV to value(item mijnindex of gVertlist) + Vert
  105.     if the visible of sprite 29 then
  106.       set the visible of sprite 32 to 0
  107.     end if
  108.     if (PositionH > 0) and (PositionH < 640) then
  109.       set the locH of sprite i to PositionH
  110.       set the locV of sprite i to PositionV
  111.       set NumFrames to value(item mijnindex of gCastframeList)
  112.       if NumFrames > 1 then
  113.         set temp to the castNum of sprite i + 1
  114.         set Base to value(item mijnindex of gCastlist)
  115.         if temp > (Base + NumFrames - 1) then
  116.           set the castNum of sprite i to Base
  117.         else
  118.           set the castNum of sprite i to temp
  119.         end if
  120.       end if
  121.       set the visible of sprite i to 1
  122.       if the visible of sprite 29 then
  123.         set the visible of sprite 32 to 0
  124.       end if
  125.       updateStage()
  126.     end if
  127.     PLaysounds()
  128.   end repeat
  129. end
  130.  
  131. on SlideV VoffSet
  132.   global gVertSprite
  133.   set the visible of sprite gVertSprite to 0
  134.   set gVertSprite to gVertSprite + VoffSet
  135.   if gVertSprite < 1 then
  136.     set gVertSprite to 1
  137.   end if
  138.   if gVertSprite > 21 then
  139.     set gVertSprite to 21
  140.   end if
  141.   set the visible of sprite gVertSprite to 1
  142. end
  143.  
  144. on SlideAllover firstFrame, lastFrame, LmouseBorder, RmouseBorder, TopMouseBorder, BottomMouseBorder
  145.   global gLastState, gLastSound
  146.   if the mouseH < LmouseBorder then
  147.     if the mouseV < TopMouseBorder then
  148.       CursorTopLeft()
  149.     else
  150.       if the mouseV > BottomMouseBorder then
  151.         CursorBotLeft()
  152.       else
  153.         CursorLeft()
  154.       end if
  155.     end if
  156.   else
  157.     if the mouseH > RmouseBorder then
  158.       if the mouseV < TopMouseBorder then
  159.         CursorTopRight()
  160.       else
  161.         if the mouseV > BottomMouseBorder then
  162.           CursorBotRight()
  163.         else
  164.           CursorRight()
  165.         end if
  166.       end if
  167.     else
  168.       if the mouseV < TopMouseBorder then
  169.         CursorUp()
  170.       else
  171.         if the mouseV > BottomMouseBorder then
  172.           CursorDown()
  173.         else
  174.           cursor(-1)
  175.         end if
  176.       end if
  177.     end if
  178.   end if
  179.   if the mouseDown then
  180.     if the mouseV < TopMouseBorder then
  181.       SlideV(-1)
  182.       set vertscroll to 1
  183.     else
  184.       if the mouseV > BottomMouseBorder then
  185.         SlideV(1)
  186.         set vertscroll to 1
  187.       else
  188.         set vertscroll to 0
  189.       end if
  190.     end if
  191.     if vertscroll then
  192.       hideObjects(22, 37)
  193.     end if
  194.     if the mouseH < LmouseBorder then
  195.       if not gLastState then
  196.         hideObjects(22, 37)
  197.       end if
  198.       if the frame > firstFrame then
  199.         go(the frame - 1)
  200.       else
  201.         go(lastFrame)
  202.       end if
  203.       set Horscroll to 1
  204.     else
  205.       if the mouseH > RmouseBorder then
  206.         if not gLastState then
  207.           hideObjects(22, 37)
  208.         end if
  209.         if the frame < lastFrame then
  210.           go(the frame + 1)
  211.         else
  212.           go(firstFrame)
  213.         end if
  214.         set Horscroll to 1
  215.       else
  216.         set Horscroll to 0
  217.         go(the frame)
  218.         updateStage()
  219.       end if
  220.     end if
  221.     if not (vertscroll or Horscroll) then
  222.       ShowObjects(22, 37)
  223.     end if
  224.     set gLastState to vertscroll or Horscroll
  225.   else
  226.     ShowObjects(22, 37)
  227.     go(the frame)
  228.     set gLastState to 0
  229.   end if
  230. end
  231.  
  232. on PLaysounds
  233.   global gLastSprite
  234.   if rollOver(22) then
  235.     set newSound to "digi kerkklok"
  236.     set curSprite to 22
  237.   else
  238.     if rollOver(23) then
  239.       set newSound to "Wklkoekepeer"
  240.       set curSprite to 23
  241.     else
  242.       if rollOver(24) then
  243.         set newSound to "deur dicht fancy"
  244.         set curSprite to 24
  245.       else
  246.         if rollOver(25) then
  247.           set newSound to "applaus hard.a"
  248.           set curSprite to 25
  249.         else
  250.           if rollOver(26) then
  251.             set newSound to "cart4.85 boek 5"
  252.             set curSprite to 26
  253.           else
  254.             if rollOver(28) then
  255.               set newSound to "putdeksel"
  256.               set curSprite to 28
  257.             else
  258.               if rollOver(31) then
  259.                 set newSound to "cart5.15 politie"
  260.                 set curSprite to 31
  261.               else
  262.                 if rollOver(33) then
  263.                   set newSound to "bbc 10 vibra ok"
  264.                   set curSprite to 33
  265.                 else
  266.                   if rollOver(34) then
  267.                     set newSound to "cart2.82 gil vrouw"
  268.                     set curSprite to 34
  269.                   else
  270.                     if rollOver(35) then
  271.                       set newSound to "cart1.29 olifant"
  272.                       set curSprite to 35
  273.                     else
  274.                       if rollOver(36) then
  275.                         set newSound to "ballon 2ok.a"
  276.                         set curSprite to 36
  277.                       else
  278.                         if rollOver(37) then
  279.                           set newSound to "cart1.1"
  280.                           set curSprite to 37
  281.                         else
  282.                           set newSound to 0
  283.                         end if
  284.                       end if
  285.                     end if
  286.                   end if
  287.                 end if
  288.               end if
  289.             end if
  290.           end if
  291.         end if
  292.       end if
  293.     end if
  294.   end if
  295.   if curSprite <> gLastSprite then
  296.     set gLastSprite to curSprite
  297.     puppetSound(newSound)
  298.   end if
  299. end
  300.